<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>select3:带树级的搜索下拉框插件</title>
<link rel="stylesheet" type="text/css" href="http://www.lovejavascript.com/css/base.css">
<link rel="stylesheet" type="text/css" href="http://www.lovejavascript.com/css/module.css"/>
<link rel="stylesheet" type="text/css" href="css/select3.css"/>
</head>
<body>
<h2>select3:带树级的搜索下拉框插件</h2>
<p>存在.json文件，谷歌需要放到环境中效果才能展现</p>
<hr/>
<div>
    <div>
        <input type="text" id="test1" style="width:300px;height:32px;"/>
    </div>
    <hr/>
    <div>
        <input type="text" id="test2" style="width:300px;height:32px;"/>
    </div>
    <hr/>
    <div>
        <input type="text" id="test3" style="width:300px;height:32px;"/>
    </div>
</div>

<script type="text/javascript" src="http://www.lovejavascript.com/js/jquery-2.1.4.min.js"></script>
<script type="text/javascript" src="js/select3.js"></script>
<script type="text/javascript" id="script-source">
$(function(){
	//当前使用调试数据，获取支撑数据
	$.getJSON('data/testData.json', function(json){
		$('#test1').select3({
			treeData:json,
			data:[6017625561183],
			isDevelopMode: true
		});	
		$('#test2').select3({
			treeData:json
		});
		$('#test2').select3("data", [{id:6019564383383, name:"节点31"}, {id:6017625561183, name:"节点12"}]);
		$('#test3').select3({
			treeData:json
		});
		$('#test3').select3("val", "6019164630583");
	});
});
</script>
</body>
</html>
